home *** CD-ROM | disk | FTP | other *** search
- function jump()
- {
- if(canjump == true and dead == false)
- {
- gotoAndStop("Φ╖│");
- play();
- yinc = -10;
- inAir = true;
- canjump = false;
- }
- }
- stop();
- onEnterFrame = function()
- {
- if(_parent._parent.pauses == false)
- {
- if(dix == false)
- {
- this._x -= spd;
- long += spd;
- this._xscale = 100;
- }
- else
- {
- this._x += spd;
- long += spd;
- this._xscale = -100;
- }
- if(long >= 150)
- {
- long = 0;
- if(dix == false)
- {
- dix = true;
- }
- else
- {
- dix = false;
- }
- }
- if(acted == false and dead == false)
- {
- jump();
- acted = true;
- }
- if(acted == true and dead == false)
- {
- act_i++;
- if(act_i >= 70)
- {
- act_i = 0;
- acted = false;
- }
- }
- var _loc3_ = 0;
- while(_loc3_ < _parent._parent.land_array.length)
- {
- var _loc5_ = _parent[_parent._parent.land_array[_loc3_]];
- if(this.qfk.hitTest(_loc5_) and _loc5_.noWalk == true)
- {
- if(movRight == true)
- {
- this._x += spd;
- }
- if(movLeft == true)
- {
- this._x -= spd;
- }
- }
- _loc3_ = _loc3_ + 1;
- }
- if(inAir == true)
- {
- if(yinc < 10)
- {
- yinc += g;
- }
- this._y += yinc;
- _loc3_ = 0;
- while(_loc3_ < _parent._parent.land_array.length)
- {
- landObject = _parent[_parent._parent.land_array[_loc3_]];
- var _loc4_ = landObject.getBounds(_parent).yMin;
- if(this.dfk.hitTest(landObject))
- {
- if(this._y - yinc < _loc4_)
- {
- inAir = false;
- this._y = _loc4_;
- yinc = 0;
- canjump = true;
- gotoAndStop(2);
- break;
- }
- }
- _loc3_ = _loc3_ + 1;
- }
- }
- }
- };
-